Low-level systems programming often struggles with keeping code in sync with specifications and documentation. When specs change, handwritten code can quickly become outdated, introducing errors and maintenance overhead.
This talk presents a workflow where JSON, INI, Mermaid diagrams, and Markdown documents are treated as first-class inputs and converted into Rust code with zero runtime overhead. Using Rust macros, include_str!, and build.rs, structured inputs are transformed into strongly typed Rust data structures, validated at compile time. The system can handle single-file or cross-file constraints, ensuring correctness while eliminating boilerplate.
Attendees will see how these techniques were applied to implement a working RISC-V assembler and linker, where instruction formats, encodings, and linker behaviors are defined in human-readable documents and diagrams, then automatically translated into safe, executable Rust code. This approach makes it easy to check, verify, and refactor, and also provides a foundation for improving AI-assisted coding: structured inputs are easier for AI tools to generate, review, and validate.
The session demonstrates a workflow that makes systems programming more visual, maintainable, and robust, bridging human-readable specifications and safe Rust implementations.